Perl 6 at a Glance by Andrew Shitov

Perl 6 at a Glance by Andrew Shitov

Author:Andrew Shitov [Shitov, Andrew]
Language: eng
Format: azw3, pdf
Publisher: DeepText
Published: 2020-07-12T16:00:00+00:00


Perl 6 also supports object-oriented programming in its general understanding. If you are familiar with how to use classes in other modern programming languages, it will be easy for you to work with classes in Perl 6.

This is how the class is declared:

class Cafe {

}

Class attributes

Class data variables are called attributes. They are declared with the has keyword. An attribute’s scope is defined via its twigil. As usual, the first character of the twigil indicates the type of the container (thus, a scalar, an array, or a hash). The second character is either . if a variable is public or ! for the private ones. An accessor will be generated by a compiler for the public attributes.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.